package com.sanyu.lovefishing.ui.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import com.lyf.core.ui.fragment.BaseFragment;
import com.lyf.core.ui.fragment.BaseMvpFragment;
import com.sanyu.lovefishing.databinding.FragmentWeatherBinding;
import com.sanyu.lovefishing.mvp.WeatherPresenter;
import com.sanyu.lovefishing.mvp.view.IWeatherView;


/**
 * 天气
 */
public class WeatherFragment extends BaseMvpFragment<FragmentWeatherBinding, WeatherPresenter> implements IWeatherView {
    public static WeatherFragment newInstance() {
        Bundle args = new Bundle();
        WeatherFragment fragment = new WeatherFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    protected FragmentWeatherBinding getViewBinding(LayoutInflater inflater, ViewGroup container) {
        return FragmentWeatherBinding.inflate(inflater,container,false);
    }

    @Override
    public WeatherPresenter getPresenter() {
        return new WeatherPresenter();
    }

    @Override
    protected void initData() {
        super.initData();
        mPresenter.getTodayWeather();
    }
}
